import Base from '@/services/base'

export default class CourseService extends Base {
	constructor(auth, showloading) {
		super(auth, showloading);
	}

	//课程列表
	async courseList(params) {
		return await this.fly.get('/api/course/courseList', params);
	}

	//课程基本信息(简介)
	async courseInfo(params) {
		return await this.fly.get('api/course/queryCourseInfo', params);
	}

	//目录列表
	async catalogList(params) {
		return await this.fly.get('api/course/queryCourseIndex', params);
	}

	//作业列表
	async homeworkList(params) {
		return await this.fly.get('api/course/queryHomeworkList', params);
	}

	//讨论列表
	async commentList(params) {
		return await this.fly.get('api/course/queryThemeDiscussList', params);
	}

	//讨论主题详情
	async discussInfo(params) {
		return await this.fly.get('/api/course/queryThemeDiscussInfo', params);
	}

	//发表评论
	async publishDiscuss(params) {
		return await this.fly.post('/api/course/publishDiscuss', params);
	}

	//课件信息
	async lessonInfo(params) {
		return await this.fly.get('/api/course/queryLessonInfo', params);
	}

}
